// 笔试强训day35:求和

#include <iostream>
#include <vector>
using namespace std;

void dfs(vector<int>& ans, int nl, int nr, int m)
{
    for(int i = nl; i <= nr; i++)
    {
        int need = m - i;
        if(need == 0)
        {
            for(int i = 0; i < ans.size(); i++)
            {
                cout << ans[i] << " ";
            }
            cout << i << endl;
            return;
        }
        else if(need > 0)
        {
            ans.emplace_back(i);
            dfs(ans, i + 1, nr, need);
            ans.pop_back();
        }
    }
}

int main() {
    int n, m; cin >> n >> m;
    vector<int> ans;
    dfs(ans, 1, n, m);
}